package com.jie.service.impl;

import com.jie.dao.AgencyDao;
import com.jie.dao.impl.AgencyDaoImpl;
import com.jie.entity.Agency;
import com.jie.service.AgencyService;

import java.util.List;

/**
 * Created by 12904 on 2018/7/28.
 */
public class AgencyServiceImpl implements AgencyService
{

    @Override
    public List<Agency> find(int page, int size)
    {
        AgencyDao dao = new AgencyDaoImpl();
        return dao.find(page,size);
    }

    @Override
    public int find()
    {
        AgencyDao dao = new AgencyDaoImpl();
        return dao.find();
    }

    @Override
    public int delAgency(int agencyid)
    {
        AgencyDao dao = new AgencyDaoImpl();
        return dao.delAgency(agencyid);
    }

    @Override
    public int findByuid(int uid)
    {
        AgencyDao dao = new AgencyDaoImpl();
        return dao.findByuid(uid);
    }

    @Override
    public int update(Agency agency)
    {
        AgencyDao dao = new AgencyDaoImpl();
        return dao.update(agency);
    }

    @Override
    public Agency findAgency(int agencyid)
    {
        AgencyDao dao = new AgencyDaoImpl();
        return dao.findAgency(agencyid);
    }
}
